<?php
/**
 * @package WordPress
 * @subpackage LRC-Library_Theme
 */
?>
<?php get_header(); ?>	
<?php if (have_posts()) :?>
 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
 	  <?php /* If this is a category archive */ if (is_category()) { ?>
		<h1 class="catheader"><?php single_cat_title(); ?></h1>
	  <?php $catdesc = category_description(); if(stristr($catdesc,'<p>')) { echo '<div class="catdesc">'.$catdesc.'</div>'; } ?>   
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
      	<h1 class="catheader"><?php printf(__("Posts Tagged &#8216; %s &#8217;", "bhon_pro"), single_tag_title('',false)); ?></h1>
        <div id="tagcloud"><?php wp_tag_cloud('smallest=8&largest=16'); ?></div>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h1 class="catheader"><?php _e("Archive for ", "bhon_pro").the_time(__('F jS, Y','bhon_pro')); ?></h1>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h1 class="catheader"><?php _e("Archive for ", "bhon_pro").the_time(__('F, Y','bhon_pro')); ?></h1>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h1 class="catheader"><?php _e("Archive for ", "bhon_pro").the_time(__('Y','bhon_pro')); ?></h1>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h1 class="catheader"><?php _e("Author Archive", "bhon_pro"); ?></h1>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h1 class="catheader"><?php _e("Blog Archives", "bhon_pro"); ?></h1>
 	  <?php } ?><br /><br />
<table border="5" cellpadding="5" cellspacing="15" width="99%" cols="6" id="booklist" class="booklist">
<tr border="1" id="booklist" class="booklist"><td><h3>Book ID:</h3></td><td><h3>Title:</h3></td><td><h3>Authors</h3></td><td><h3>Category/Class</h3></td><td><h3>Publishers</h3></td><td><h3>listed Date</h3></td></tr>
<?php while (have_posts()) : the_post(); ?>

<?php
		$custom = get_post_custom($post->ID);
		$thumb = $custom['book-thumb'][0];
		$bookid= $custom['bookid'][0];
		$authors= $custom['bookauthors'][0]; ?>

<tr><td><a href="<?php the_permalink() ?>" title="<?php printf(__("Permanent Link to %s", "wpbl"), the_title_attribute('echo=0')); ?>"><?php echo $bookid; ?></a></td>
<td style="width:200px;"><a href="<?php the_permalink() ?>" title="<?php printf(__("Permanent Link to %s", "wpbl"), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></td>

<td>
<?php the_terms( $post->ID, 'authors'); ?></td>
<td><?php the_terms( $post->ID, 'classcat'); ?></td>
<td><?php the_terms( $post->ID, 'publishers'); ?></td>
				
				<td><?php  the_time(get_option('date_format')); ?></td>
</tr>


<?php endwhile; ?></table><br />	<?php
    if(function_exists('pagination')) { pagination(); }
    ?>
	<br />
	<?php else: ?>

<div class="entry">
<p><?php _e('Sorry, no posts matched your criteria.','wpbl'); ?></p>
</div>

<?php endif; ?>

<?php get_footer(); ?>